package com.zbzly.reactive.reactiverbac.config;

import com.zbzly.reactive.reactiverbac.utils.JwtUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JwtTokenConfig {
    @Value("${jwt.secret}")
    private String secret;
    @Value("${jwt.expiration}")
    private Long expiration;
    @Value("${jwt.issuer}")
    private String issuer;

    @Bean
    public JwtUtil jwtUtil() {
        return new JwtUtil(secret, expiration, issuer);
    }
}
